﻿namespace Recast
{
    public static class Status
    {
        // High level status.
        public const uint DT_FAILURE = 1u << 31;            // Operation failed.
        public const uint DT_SUCCESS = 1u << 30;            // Operation succeed.
        public const uint DT_IN_PROGRESS = 1u << 29;        // Operation still in progress.

        // Detail information for status.
        public const uint DT_STATUS_DETAIL_MASK = 0x0ffffff;
        public const uint DT_WRONG_MAGIC = 1 << 0;      // Input data is not recognized.
        public const uint DT_WRONG_VERSION = 1 << 1;    // Input data is in wrong version.
        public const uint DT_OUT_OF_MEMORY = 1 << 2;    // Operation ran out of memory.
        public const uint DT_INVALID_PARAM = 1 << 3;    // An input parameter was invalid.
        public const uint DT_BUFFER_TOO_SMALL = 1 << 4; // Result buffer for the query was too small to store all results.
        public const uint DT_OUT_OF_NODES = 1 << 5;     // Query ran out of nodes during search.
        public const uint DT_PARTIAL_RESULT = 1 << 6;   // Query did not reach the end location, returning best guess. 
        public const uint DT_ALREADY_OCCUPIED = 1 << 7;	// A tile has already been assigned to the given x,y coordinate
    }

    public enum NavMeshPolyAreas
    {
        SAMPLE_POLYAREA_GROUND,
        SAMPLE_POLYAREA_WATER,
        SAMPLE_POLYAREA_ROAD,
        SAMPLE_POLYAREA_DOOR,
        SAMPLE_POLYAREA_GRASS,
        SAMPLE_POLYAREA_JUMP,
    };

    public enum NavMeshPolyFlags
    {
        SAMPLE_POLYFLAGS_WALK = 0x01,       // Ability to walk (ground, grass, road)
        SAMPLE_POLYFLAGS_SWIM = 0x02,       // Ability to swim (water).
        SAMPLE_POLYFLAGS_DOOR = 0x04,       // Ability to move through doors.
        SAMPLE_POLYFLAGS_JUMP = 0x08,       // Ability to jump.
        SAMPLE_POLYFLAGS_DISABLED = 0x10,       // Disabled polygon
        SAMPLE_POLYFLAGS_ALL = 0xffff   // All abilities.
    };
}